def shijuntong(renshu,n,m):
    list1 = [i for i in range(1,renshu)]
    print(list1)
    k = 0
    while len(list1)>2 :
        i = 0
        while i<len(list1):
            k += 1
            if k == 3:
                list1.remove(list1[i])
                k =0
            else:
                i += 1
    print(list1)
shijuntong(1000,1,1)
